﻿#include "mainwindow.h"
#include <QApplication>
#include "preference.h"
#include "cryptdialog.h"
#include "csv.h"
//#define USE_CRYPT
#ifdef USE_CRYPT
#include "D:\\ProjectFile\\MWidgetCrypt\\mwidgetcrypt.h"
#pragma comment(lib,"D:\\ProjectFile\\build-MWidgetCrypt-Desktop_Qt_5_12_8_MSVC2017_64bit-Release\\release\\MWidgetCrypt.lib")
#endif



#pragma comment(lib,"d:/ProjectFile/third_party/crypt/vc15/cryptlib.lib")

int main(int argc, char *argv[])
{
    SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
    Preference::GetIns()->prj->SetFilePos("prj.ini");


    QApplication a(argc, argv);

#ifdef USE_CRYPT
    FormCrypt FC(0,-1);
    //目标是 0 0 才弹出来 1 0， 0 1 ，1 1都不弹出来
    if(!(FC.ValidSerialsWeak()||FC.isValidSerials())){ FC.show();FC.exec();}
#endif

    MainWindow w;
    w.OnInit();
    w.show();
    return a.exec();
}
